package bluetooth.data;

import java.util.ArrayList;
import java.util.List;

import bluetooth.model.Category;
import bluetooth.model.Product;

import com.google.gson.Gson;

public final class DataFactory {

	public static String getJsonData (){
		
	    List<Product> products = new ArrayList<Product> ();
		
		products.add(createNewProduct("Proizvod 1"));
		products.add(createNewProduct("Proizvod 2"));
		products.add(createNewProduct("Proizvod 3"));
		products.add(createNewProduct("Proizvod 4"));
		products.add(createNewProduct("Proizvod 5"));
		products.add(createNewProduct("Proizvod 6"));
		products.add(createNewProduct("Proizvod 7"));
		products.add(createNewProduct("Proizvod 8"));
		
		//Convert list to json
		String json = new Gson().toJson( products);
		json +="\r\n";
		return json;
	}
	
	private static  Product createNewProduct(String name){
		
		Product p = new Product ();
		p.setName(name);
		return p;
		
	}
	
}
